import {
	defineStore
} from 'pinia';


export const useMainStore = defineStore('mainNiu', {
	state: () => ({
		bid: 'KiLtfQodXzQ1VJ98d0uy0g==',
		token: '', 
		openid: '',
		session_key: '',
		color: '#0083FF',
		System: '',
		navWidth: 281,
		statusBarHeight: '',
		navBarHeight: 40,
		totalHeight: 40,
		capsuleWidth: 87,
		windowHeight: 0,
		safeAreaInsets: '',
		position: { // 经纬度
			longitude: 0,
			latitude: 0,
		},
		agree: false, // 注册登录协议
		portType: '', // 1、普通用户 2、企业端 3、律师端
		employeeType: '', // 员工类型(企业端角色：0：普通员工、1：hr、2：boss、3：部门负责人)
		hr: false, // HR
		staff: false, // 员工
		lawyer: false, //律师
		userInfo: '',
		BaseInfo: '',
		chatHomeList: [],
		sharInfo: {
			title: '',
			imageUrl: '',
			desc: '',
		},
		h5AuthUrl: '',
		orderId: '',
		keyBoardHeight: '',
	}),
	actions: {


	},
	getters: {
		themeColor: (state) => {
			return `--themeColor:${state.color}`
		}
	},
	unistorage: true,
})